<%@page import="chat.user.ChatMsg"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.ArrayList"%>
<%@page import="chat.single.MsgSing"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="utf-8"%>

<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="refresh" charset="UTF-8">
		<title></title>
	</head>
	<body style="height:297px;margin: 0;">
		<%
		request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");
		String path = request.getContextPath();
		out.println("<div style='width:100%;height:100%; background-color:cornflowerblue;'>");
	
		
		ArrayList list = MsgSing.getIns().getAllMsg();
		SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		
		for (int i = 0; i < list.size(); i++) {
			ChatMsg msg = (ChatMsg) list.get(i);
			String content=msg.getContent();
			String conten1t = new String(content.getBytes("iso-8859-1"), "utf-8");
			chat.user.UserBean u = msg.getUser();
			String ct = sf.format(msg.getCreateTime());

			out.println("<span  style='color:' > <br/>"+u.getName()+"   :"+conten1t+" </br>["+ct+"]</span>");
		}
		out.println("</div>");
		%>
		
	</body>
</html>
